/**
 * 2025/01/01 - 2025/12/31
 */
package com.snail.server.database.engine.error;

import com.snail.starter.commons.error.IErrorCode;
import lombok.Getter;
import lombok.ToString;

/**
 *
 * @author zgadmin
 * @date 2025/9/8 10:34
 *
 */
@Getter
@ToString
public enum DatabaseEngineErrorCode implements IErrorCode {

    NOT_SUPPORT_FIELD_TYPE(30000001, "not support field type:%s"),
    NOT_SUPPORT_INDEX_TYPE(30000002, "not support index type:%s"),
    MISS_DATASOURCE_TYPE(30000003, "miss datasource type"),
    MISS_DDL_OPERATION_IMPL(30000004, "miss ddl operation impl:%s"),
    DATASOURCE_NOT_EXISTS_OR_STATUS_ERROR(30000005, "datasource not exists or status error:%s,%s"),
    FIELD_TYPE_NULL(30000006, "field type null"),
    INDEX_TYPE_NULL(30000007, "index type null"),
    NOT_SUPPORT_INDEX_FIELD_ORDER_BY(30000008, "not support index field order by:%s"),
    TABLE_NOT_EXISTS(30000009, "table not exists:%s"),

    ;

    private final Integer code;

    private final String defaultMessage;

    DatabaseEngineErrorCode(Integer code, String defaultMessage) {
        this.code = code;
        this.defaultMessage = defaultMessage;
    }

    @Override
    public String getBundleName() {
        return "database-engine";
    }
}